package com.zsl.blog.api.controller;

import com.zsl.blog.api.dao.pojo.Tag;
import com.zsl.blog.api.service.TagService;
import com.zsl.blog.api.vo.Result;
import com.zsl.blog.api.vo.params.LimitParams;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("tags")
@Api(tags = "标签")
public class TagsController {
    @Autowired
    private TagService tagService;

    @GetMapping("/hot")
    @ApiOperation("热度标签")
    public Result hot(){
        Integer num = 4;
        List<Tag> hots = tagService.hots(num);
        return Result.success(hots);
    }
}
